﻿using System.Windows;
using QDP.Platform.Silverlight;

namespace Apps.Common
{
    public class FullScreen : PartElement
    {
        public FullScreen()
        {
            Application.Current.Host.Content.FullScreenChanged += new System.EventHandler(Content_FullScreenChanged);
        }
        public override void Show()
        {
            Application.Current.Host.Content.IsFullScreen = true;
            this.IsShowed = true;
        }

        void Content_FullScreenChanged(object sender, System.EventArgs e)
        {
            this.IsShowed = Application.Current.Host.Content.IsFullScreen;
        }
        public override void Close()
        {
            this.IsShowed = false;
            Application.Current.Host.Content.IsFullScreen = false;
            //base.Close();
        }
    }
}
